A mobile device such as a cellular phone or a smart phone, PDA, handheld computer, navigational device, gaming device, netbook, among others can be equipped with a magnetometer. Magnetic readings from the magnetometer can be used to provide a user with a direction, which may be a “heading” (typically given relative to the Earth's true North), and/or an arrow pointing to true North. The direction information may be provided for the user's own navigation knowledge, for example, to tell the user which way is north while the user is walking or driving in unfamiliar surroundings. The direction information can also be used by a navigation or map application that may be running on the mobile device.
The magnetometer obtains a measure of the magnetic field that is present in the immediate surroundings of the mobile device as a two or three-component vector in a Cartesian coordinate system using 2-axis or 3-axis magnetic sensors. The sensed magnetic field can contain a contribution of the Earth's magnetic field and a contribution by a local interference field (device co-located interference fields). The latter is a magnetic field that is created by components in the local environment of the mobile device. This may include contributions by one or more magnetic field sources that are near the magnetic sensors, such as the magnet of a loudspeaker that is built into the mobile device. The interference field may also have a contribution due to one or more magnetic objects found in the external environment close to the device, such as when the user is driving an automobile, riding in a train or bus, or riding on a bicycle or motorcycle. In most cases, the interference field is not negligible relative to the Earth's magnetic field. Therefore, a calibration procedure is needed to reduce the adverse impact of the interference field contribution from the sensors' measurements to allow the magnetometer to calculate a more accurate direction.
There are several types of 3-axis calibration procedures. In one such technique, the user is instructed to rotate the mobile device (containing the magnetometer) according to a set of geometrically different orientations and azimuth angles, while measurements by the magnetometer and by an orientation sensor are collected and analyzed to isolate or quantify the interference field. The quantified interference field can then be subtracted from the measurement taken by the magnetic sensor to yield the Earth's geomagnetic field. The Earth's geomagnetic field can be further corrected to get the true north direction, such as correcting for magnetic variation (declination) due to the variation of the Earth's magnetic field based on geographic location.
In another 3-axis calibration technique, rather than instruct the user to deliberately rotate the mobile device in a predetermined manner, measurements are collected from the magnetometer, continuously over a period of time, while the mobile device is being used or carried by the user. This can lead to random (albeit sufficient) rotations of the mobile device, such that the magnetometer measurements define a desired, generally spherical measurement space. The sphere is offset from the origin of a coordinate system for the Earth's geomagnetic field vector by an unknown offset vector, which can represent a substantial part (if not all) of the interference field. Mathematical processing of the measurements can be performed to “re-center” the sphere by determining the offset vector. This technique is transparent to the user because the user is not required to go through a calibration procedure where the user deliberately rotates the device through a specified set of orientations.
The calibration techniques described above are effective but time consuming. As the user travels with the mobile device, the magnetometer will encounter different magnetic environments with varying local interference. These different magnetic environments can require a recalibration procedure and the calculation of a new offset vector. Even if the user returns to a previous location, a recalibration procedure may be required due to a change in the local interference field.